# 大连商品交易所历史数据下载链接
DCE_DOWNLOAD_URLS = {
    # 2023年数据
    '2023': {
        'a': '/dalianshangpin/resource/cms/article/8590659/8590729/a_ftr.xlsx',  # 黄大豆1号
        'b': '/dalianshangpin/resource/cms/article/8590659/8590762/b_ftr.xlsx',  # 黄大豆2号
        'c': '/dalianshangpin/resource/cms/article/8590659/8590763/c_ftr.xlsx',  # 玉米
        'cs': '/dalianshangpin/resource/cms/article/8590659/8590790/cs_ftr.xlsx',  # 玉米淀粉
        'm': '/dalianshangpin/resource/cms/article/8590659/8590828/m_ftr.xlsx',  # 豆粕
        'y': '/dalianshangpin/resource/cms/article/8590659/8590860/y_ftr.xlsx',  # 豆油
        'p': '/dalianshangpin/resource/cms/article/8590659/8590837/p_ftr.xlsx',  # 棕榈油
        'rr': '/dalianshangpin/resource/cms/article/8590659/8590831/rr_ftr.xlsx',  # 粳米
        'jd': '/dalianshangpin/resource/cms/article/8590659/8590817/jd_ftr.xlsx',  # 鸡蛋
        'lh': '/dalianshangpin/resource/cms/article/8590659/8590820/lh_ftr.xlsx',  # 生猪
        'bb': '/dalianshangpin/resource/cms/article/8590659/8590785/bb_ftr.xlsx',  # 胶合板
        'fb': '/dalianshangpin/resource/cms/article/8590659/8590800/fb_ftr.xlsx',  # 纤维板
        'i': '/dalianshangpin/resource/cms/article/8590659/8590764/i_ftr.xlsx',  # 铁矿石
        'jm': '/dalianshangpin/resource/cms/article/8590659/8590771/jm_ftr.xlsx',  # 焦煤
        'j': '/dalianshangpin/resource/cms/article/8590659/8590768/j_ftr.xlsx',  # 焦炭
        'l': '/dalianshangpin/resource/cms/article/8590659/8590834/l_ftr.xlsx',  # 线型低密度聚乙烯
        'pp': '/dalianshangpin/resource/cms/article/8590659/8590840/pp_ftr.xlsx',  # 聚丙烯
        'v': '/dalianshangpin/resource/cms/article/8590659/8590841/v_ftr.xlsx',  # 聚氯乙烯
        'eb': '/dalianshangpin/resource/cms/article/8590659/8590793/eb_ftr.xlsx',  # 苯乙烯
        'eg': '/dalianshangpin/resource/cms/article/8590659/8590796/eg_ftr.xlsx',  # 乙二醇
        'pg': '/dalianshangpin/resource/cms/article/8590659/8590775/pg_ftr.xlsx',  # 液化石油气
    },
    
    # 2022年数据
    '2022': {
        'a': '/dalianshangpin/resource/cms/article/8530800/8533677/a.xlsx',
        'b': '/dalianshangpin/resource/cms/article/8530800/8533701/b.xlsx',
        'c': '/dalianshangpin/resource/cms/article/8530800/8533705/c.xlsx',
        'cs': '/dalianshangpin/resource/cms/article/8530800/8533706/cs.xlsx',
        'm': '/dalianshangpin/resource/cms/article/8530800/8533731/m.xlsx',
        'y': '/dalianshangpin/resource/cms/article/8530800/8533764/y.xlsx',
        'p': '/dalianshangpin/resource/cms/article/8530800/8533739/p.xlsx',
        'rr': '/dalianshangpin/resource/cms/article/8530800/8533740/rr.xlsx',
        'jd': '/dalianshangpin/resource/cms/article/8530800/8533715/jd.xlsx',
        'lh': '/dalianshangpin/resource/cms/article/8530800/8533730/lh.xlsx',
        'bb': '/dalianshangpin/resource/cms/article/8530800/8533704/bb.xlsx',
        'fb': '/dalianshangpin/resource/cms/article/8530800/8533723/fb.xlsx',
        'i': '/dalianshangpin/resource/cms/article/8530800/8533724/i.xlsx',
        'jm': '/dalianshangpin/resource/cms/article/8530800/8533729/jm.xlsx',
        'j': '/dalianshangpin/resource/cms/article/8530800/8533712/j.xlsx',
        'l': '/dalianshangpin/resource/cms/article/8530800/8533736/l.xlsx',
        'pp': '/dalianshangpin/resource/cms/article/8530800/8533767/pp.xlsx',
        'v': '/dalianshangpin/resource/cms/article/8530800/8533770/v.xlsx',
        'eb': '/dalianshangpin/resource/cms/article/8530800/8533698/eb.xlsx',
        'eg': '/dalianshangpin/resource/cms/article/8530800/8533709/eg.xlsx',
        'pg': '/dalianshangpin/resource/cms/article/8530800/8533741/pg.xlsx',
    },

    # 2021年数据
    '2021': {
        'a': '/dalianshangpin/resource/cms/article/6301842/6302033/2022011115163565851.xlsx',
        'b': '/dalianshangpin/resource/cms/article/6301842/6302030/2022011115170016809.xlsx',
        'c': '/dalianshangpin/resource/cms/article/6301842/6302039/2022011115155758271.xlsx',
        'cs': '/dalianshangpin/resource/cms/article/6301842/6302036/2022011115161813729.xlsx',
        'm': '/dalianshangpin/resource/cms/article/6301842/6302027/2022011115172049823.xlsx',
        'y': '/dalianshangpin/resource/cms/article/6301842/6302024/2022011115174251997.xlsx',
        'p': '/dalianshangpin/resource/cms/article/6301842/6302021/2022011115180238885.xlsx',
        'jd': '/dalianshangpin/resource/cms/article/6301842/6302012/2022011115190249191.xlsx',
        'bb': '/dalianshangpin/resource/cms/article/6301842/6302015/2022011115184083139.xlsx',
        'fb': '/dalianshangpin/resource/cms/article/6301842/6302018/2022011115182220905.xlsx',
        'i': '/dalianshangpin/resource/cms/article/6301842/6301991/2022011115220930165.xlsx',
        'jm': '/dalianshangpin/resource/cms/article/6301842/6301994/2022011115214830698.xlsx',
        'j': '/dalianshangpin/resource/cms/article/6301842/6301997/2022011115212776517.xlsx',
        'l': '/dalianshangpin/resource/cms/article/6301842/6302006/2022011115202775390.xlsx',
        'pp': '/dalianshangpin/resource/cms/article/6301842/6302000/2022011115210913087.xlsx',
        'v': '/dalianshangpin/resource/cms/article/6301842/6302003/2022011115204944778.xlsx',
        'eb': '/dalianshangpin/resource/cms/article/6301842/6301984/2022011115225465161.xlsx',
        'eg': '/dalianshangpin/resource/cms/article/6301842/6301988/2022011115222980826.xlsx',
        'pg': '/dalianshangpin/resource/cms/article/6301842/6301981/2022011115231668959.xlsx',
    },

    # 2020年数据
    '2020': {
        'c': '/dalianshangpin/resource/cms/2021/01/2021013022310721941.xlsx',
        'cs': '/dalianshangpin/resource/cms/2021/01/2021013022303925750.xlsx',
        'a': '/dalianshangpin/resource/cms/2021/01/2021013022293775777.xlsx',
        'b': '/dalianshangpin/resource/cms/2021/01/2021013022290225068.xlsx',
        'm': '/dalianshangpin/resource/cms/2021/01/2021013022274187325.xlsx',
        'y': '/dalianshangpin/resource/cms/2021/01/2021013022262921602.xlsx',
        'p': '/dalianshangpin/resource/cms/2021/01/2021013022255680433.xlsx',
        'fb': '/dalianshangpin/resource/cms/2021/01/2021013022250662794.xlsx',
        'bb': '/dalianshangpin/resource/cms/2021/01/2021013022244890750.xlsx',
        'jd': '/dalianshangpin/resource/cms/2021/01/2021013022243031608.xlsx',
        'rr': '/dalianshangpin/resource/cms/2021/01/2021013022241717445.xlsx',
        'l': '/dalianshangpin/resource/cms/2021/01/2021013022234479603.xlsx',
        'v': '/dalianshangpin/resource/cms/2021/01/2021013022232092285.xlsx',
        'pp': '/dalianshangpin/resource/cms/2021/01/2021013022230187061.xlsx',
        'j': '/dalianshangpin/resource/cms/2021/01/2021013022223115141.xlsx',
        'jm': '/dalianshangpin/resource/cms/2021/01/2021013022221421028.xlsx',
        'i': '/dalianshangpin/resource/cms/2021/01/2021013022215227661.xlsx',
        'eg': '/dalianshangpin/resource/cms/2021/01/2021013022205350779.xlsx',
        'eb': '/dalianshangpin/resource/cms/2021/01/2021013022203790813.xlsx',
        'pg': '/dalianshangpin/resource/cms/2021/01/2021013022202095737.xlsx',
    },

    # 2019年数据
    '2019': {
        'i': '/dalianshangpin/resource/cms/2020/03/2020030415294181033.xlsx',
        'jm': '/dalianshangpin/resource/cms/2020/03/2020030415291887285.xlsx',
        'j': '/dalianshangpin/resource/cms/2020/03/2020030415285941846.xlsx',
        'pp': '/dalianshangpin/resource/cms/2020/03/2020030415282681081.xlsx',
        'v': '/dalianshangpin/resource/cms/2020/03/2020030415275871266.xlsx',
        'l': '/dalianshangpin/resource/cms/2020/03/2020030415272788537.xlsx',
        'rr': '/dalianshangpin/resource/cms/2020/03/2020030415262149049.xlsx',
        'jd': '/dalianshangpin/resource/cms/2020/03/2020030415255843776.xlsx',
        'bb': '/dalianshangpin/resource/cms/2020/03/2020030415251943821.xlsx',
        'fb': '/dalianshangpin/resource/cms/2020/03/2020030415245211544.xlsx',
        'p': '/dalianshangpin/resource/cms/2020/03/2020030415242835829.xlsx',
        'y': '/dalianshangpin/resource/cms/2020/03/2020030415240310680.xlsx',
        'm': '/dalianshangpin/resource/cms/2020/03/2020030415233887199.xlsx',
        'b': '/dalianshangpin/resource/cms/2020/03/2020030415221765732.xlsx',
        'a': '/dalianshangpin/resource/cms/2020/03/2020030415214926535.xlsx',
        'cs': '/dalianshangpin/resource/cms/2020/03/2020030415211863019.xlsx',
        'c': '/dalianshangpin/resource/cms/2020/03/2020030415204421551.xlsx',
        'eb': '/dalianshangpin/resource/cms/2020/03/2020030415301775856.xlsx',
        'eg': '/dalianshangpin/resource/cms/2020/03/2020030415295890859.xlsx',
    },

    # 2018年数据
    '2018': {
        'a': '/dalianshangpin/resource/cms/2019/01/2019012315491595717.xlsx',
        'b': '/dalianshangpin/resource/cms/2019/01/2019012315494384352.xlsx',
        'c': '/dalianshangpin/resource/cms/2019/01/2019012315465149647.xlsx',
        'cs': '/dalianshangpin/resource/cms/2019/01/2019012315472636617.xlsx',
        'm': '/dalianshangpin/resource/cms/2019/01/2019012315503149436.xlsx',
        'y': '/dalianshangpin/resource/cms/2019/01/2019012315510143573.xlsx',
        'p': '/dalianshangpin/resource/cms/2019/01/2019012315512984994.xlsx',
        'jd': '/dalianshangpin/resource/cms/2019/01/2019012315531120895.xlsx',
        'bb': '/dalianshangpin/resource/cms/2019/01/2019012315524222344.xlsx',
        'fb': '/dalianshangpin/resource/cms/2019/01/2019012315521325884.xlsx',
        'i': '/dalianshangpin/resource/cms/2019/01/2019012315554441476.xlsx',
        'jm': '/dalianshangpin/resource/cms/2019/01/2019012315551924286.xlsx',
        'j': '/dalianshangpin/resource/cms/2019/01/2019012315545146176.xlsx',
        'l': '/dalianshangpin/resource/cms/2019/01/2019012315533698043.xlsx',
        'pp': '/dalianshangpin/resource/cms/2019/01/2019012315542858952.xlsx',
        'v': '/dalianshangpin/resource/cms/2019/01/2019012315540434464.xlsx',
        'eg': '/dalianshangpin/resource/cms/2019/01/2019012315561575616.xlsx',
    },

    # 2017年数据
    '2017': {
        'c': '/dalianshangpin/resource/cms/article/6084184/6084269/2018011113545470783.zip',
        'cs': '/dalianshangpin/resource/cms/2018/01/2018011113541720772.csv',
        'a': '/dalianshangpin/resource/cms/2018/01/2018011113533776164.csv',
        'b': '/dalianshangpin/resource/cms/2018/01/2018011113530726662.csv',
        'm': '/dalianshangpin/resource/cms/2018/01/2018011113522038255.csv',
        'y': '/dalianshangpin/resource/cms/2018/01/2018011113514177523.csv',
        'p': '/dalianshangpin/resource/cms/2018/01/2018011113510049272.csv',
        'jd': '/dalianshangpin/resource/cms/2018/01/2018011113502120120.csv',
        'bb': '/dalianshangpin/resource/cms/2018/01/2018011113491199156.csv',
        'fb': '/dalianshangpin/resource/cms/2018/01/2018011113495123053.csv',
        'i': '/dalianshangpin/resource/cms/2018/01/2018011113424399877.csv',
        'jm': '/dalianshangpin/resource/cms/2018/01/2018011113433613267.csv',
        'j': '/dalianshangpin/resource/cms/2018/01/2018011113435971763.csv',
        'l': '/dalianshangpin/resource/cms/2018/01/2018011113483039605.csv',
        'pp': '/dalianshangpin/resource/cms/2018/01/2018011113445452877.csv',
        'v': '/dalianshangpin/resource/cms/2018/01/2018011113473562155.csv',
    },

    # 2016年数据
    '2016': {
        'c': '/dalianshangpin/resource/cms/2017/04/c.zip',
        'cs': '/dalianshangpin/resource/cms/2017/04/cs.zip',
        'a': '/dalianshangpin/resource/cms/2017/04/a.zip',
        'b': '/dalianshangpin/resource/cms/2017/04/b.zip',
        'm': '/dalianshangpin/resource/cms/2017/04/m.zip',
        'y': '/dalianshangpin/resource/cms/2017/04/y.zip',
        'p': '/dalianshangpin/resource/cms/2017/04/p.zip',
        'jd': '/dalianshangpin/resource/cms/2017/04/jd.zip',
        'bb': '/dalianshangpin/resource/cms/2017/04/bb.zip',
        'fb': '/dalianshangpin/resource/cms/2017/04/fb.zip',
        'i': '/dalianshangpin/resource/cms/2017/04/i.zip',
        'jm': '/dalianshangpin/resource/cms/2017/04/jm.zip',
        'j': '/dalianshangpin/resource/cms/2017/04/j.zip',
        'l': '/dalianshangpin/resource/cms/2017/04/l.zip',
        'pp': '/dalianshangpin/resource/cms/2017/04/pp.zip',
        'v': '/dalianshangpin/resource/cms/2017/04/v.zip',
    },

    # 2015年数据
    '2015': {
        'm': '/dalianshangpin/resource/cms/2016/06/2015m.zip',
        'i': '/dalianshangpin/resource/cms/2016/06/2015i.zip',
        'jm': '/dalianshangpin/resource/cms/2016/06/2015jm.zip',
        'j': '/dalianshangpin/resource/cms/2016/06/2015j.zip',
        'pp': '/dalianshangpin/resource/cms/2016/06/2015pp.zip',
        'v': '/dalianshangpin/resource/cms/2016/06/2015v.zip',
        'l': '/dalianshangpin/resource/cms/2016/06/2015l.zip',
        'bb': '/dalianshangpin/resource/cms/2016/06/2015bb.zip',
        'fb': '/dalianshangpin/resource/cms/2016/06/2015fb.zip',
        'jd': '/dalianshangpin/resource/cms/2016/06/2015jd.zip',
        'p': '/dalianshangpin/resource/cms/2016/06/2015p.zip',
        'y': '/dalianshangpin/resource/cms/2016/06/2015y.zip',
        'b': '/dalianshangpin/resource/cms/2016/06/2015b.zip',
        'a': '/dalianshangpin/resource/cms/2016/06/2015a.zip',
        'cs': '/dalianshangpin/resource/cms/2016/06/2015cs.zip',
        'c': '/dalianshangpin/resource/cms/2016/06/2015c.zip',
    },

    # 2014年数据
    '2014': {
        'c': '/dalianshangpin/resource/cms/2016/01/2014c.zip',
        'cs': '/dalianshangpin/resource/cms/2016/01/2014cs.zip',
        'a': '/dalianshangpin/resource/cms/2016/01/2014a.zip',
        'b': '/dalianshangpin/resource/cms/2016/01/2014b.zip',
        'm': '/dalianshangpin/resource/cms/2017/12/2014m.zip',
        'y': '/dalianshangpin/resource/cms/2016/01/2014y.zip',
        'p': '/dalianshangpin/resource/cms/2016/01/2014p.zip',
        'jd': '/dalianshangpin/resource/cms/2016/01/2014jd.zip',
        'fb': '/dalianshangpin/resource/cms/2016/01/2014fb.zip',
        'bb': '/dalianshangpin/resource/cms/2016/01/2014bb.zip',
        'l': '/dalianshangpin/resource/cms/2016/01/2014l.zip',
        'v': '/dalianshangpin/resource/cms/2016/01/2014v.zip',
        'pp': '/dalianshangpin/resource/cms/2016/01/2014pp.zip',
        'j': '/dalianshangpin/resource/cms/2016/01/2014j.zip',
        'jm': '/dalianshangpin/resource/cms/2016/01/2014jm.zip',
        'i': '/dalianshangpin/resource/cms/2016/01/2014i.zip',
    },

    # 2013年数据
    '2013': {
        'c': '/dalianshangpin/resource/cms/2014/11/2013c.zip',
        'a': '/dalianshangpin/resource/cms/2014/11/2013a.zip',
        'b': '/dalianshangpin/resource/cms/2014/11/2013b.zip',
        'm': '/dalianshangpin/resource/cms/2014/11/2013m.zip',
        'y': '/dalianshangpin/resource/cms/2014/11/2013y.zip',
        'p': '/dalianshangpin/resource/cms/2014/11/2013p.zip',
        'fb': '/dalianshangpin/resource/cms/2014/11/2013fb.zip',
        'bb': '/dalianshangpin/resource/cms/2014/11/2013bb.zip',
        'jd': '/dalianshangpin/resource/cms/2014/11/2013jd.zip',
        'l': '/dalianshangpin/resource/cms/2017/12/2017120117253822650.zip',
        'v': '/dalianshangpin/resource/cms/2017/12/2017120409280461541.zip',
        'j': '/dalianshangpin/resource/cms/2014/11/2013j.zip',
        'jm': '/dalianshangpin/resource/cms/2014/11/2013jm.zip',
        'i': '/dalianshangpin/resource/cms/2014/11/2013i.zip',
    },

    # 2012年数据
    '2012': {
        'c': '/dalianshangpin/resource/cms/2014/11/2012c.zip',
        'a': '/dalianshangpin/resource/cms/2014/11/2012a.zip',
        'b': '/dalianshangpin/resource/cms/2014/11/2012b.zip',
        'm': '/dalianshangpin/resource/cms/2014/11/2012m.zip',
        'y': '/dalianshangpin/resource/cms/2014/11/2012y.zip',
        'p': '/dalianshangpin/resource/cms/2014/11/2012p.zip',
        'l': '/dalianshangpin/resource/cms/2014/11/2012l.zip',
        'v': '/dalianshangpin/resource/cms/2014/11/2012v.zip',
        'j': '/dalianshangpin/resource/cms/2014/11/2012j.zip',
    },

    # 2011年数据
    '2011': {
        'c': '/dalianshangpin/resource/cms/2014/11/2011c.zip',
        'a': '/dalianshangpin/resource/cms/2014/11/2011a.zip',
        'b': '/dalianshangpin/resource/cms/2014/11/2011b.zip',
        'm': '/dalianshangpin/resource/cms/2014/11/2011m.zip',
        'y': '/dalianshangpin/resource/cms/2014/11/2011y.zip',
        'p': '/dalianshangpin/resource/cms/2014/11/2011p.zip',
        'l': '/dalianshangpin/resource/cms/2014/11/2011l.zip',
        'v': '/dalianshangpin/resource/cms/2014/11/2011v.zip',
        'j': '/dalianshangpin/resource/cms/2014/11/2011j.zip',
    },

    # 2010年数据
    '2010': {
        'c': '/dalianshangpin/resource/cms/2014/11/2010c.zip',
        'a': '/dalianshangpin/resource/cms/2014/11/2010a.zip',
        'b': '/dalianshangpin/resource/cms/2014/11/2010b.zip',
        'm': '/dalianshangpin/resource/cms/2014/11/2010m.zip',
        'y': '/dalianshangpin/resource/cms/2014/11/2010y.zip',
        'p': '/dalianshangpin/resource/cms/2014/11/2010p.zip',
        'l': '/dalianshangpin/resource/cms/2014/11/2010l.zip',
        'v': '/dalianshangpin/resource/cms/2014/11/2010v.zip',
    },
}

# 基础URL
DCE_BASE_URL = 'http://www.dce.com.cn'

# 数据存储路径
DCE_DATA_PATH = 'F:/资料/历史数据/大商所'

# 期货品种代码
DCE_FUTURES = {
    'a': '黄大豆1号',
    'b': '黄大豆2号', 
    'c': '玉米',
    'cs': '玉米淀粉',
    'm': '豆粕',
    'y': '豆油',
    'p': '棕榈油',
    'rr': '粳米',
    'jd': '鸡蛋',
    'lh': '生猪',
    'bb': '胶合板',
    'fb': '纤维板',
    'i': '铁矿石',
    'jm': '焦煤',
    'j': '焦炭',
    'l': '线型低密度聚乙烯',
    'pp': '聚丙烯',
    'v': '聚氯乙烯',
    'eb': '苯乙烯',
    'eg': '乙二醇',
    'pg': '液化石油气'
} 